package com.hnkywl.sts.action.flow.assign;

import org.jbpm.api.model.OpenExecution;
import org.jbpm.api.task.Assignable;
import org.jbpm.api.task.AssignmentHandler;
import org.jbpm.pvm.internal.model.ExecutionImpl;

/**
 * Created with IntelliJ IDEA.
 * User: jerry
 * Date: 13-5-9
 * Time: 下午1:35
 * To change this template use File | Settings | File Templates.
 */
public class AssginTpwzjhTask implements AssignmentHandler {

    @Override
    public void assign(Assignable assignable, OpenExecution execution) throws Exception {
        ExecutionImpl executionImpl = (ExecutionImpl) execution;
        /**
         * 这里的用户通过角色获得
         */
        Object bmid = executionImpl.getVariable("contain");
        assignable.addCandidateUser(bmid.toString());
    }
}
